package edu.gatech.ece6102;

import java.io.*;
import java.net.Socket;
import java.net.SocketException;
import java.util.Hashtable;

/**
 * User: deepal
 * Date: Sep 28, 2010
 * Time: 6:48:09 PM
 */
public class MokLogger implements Logger {
    private Hashtable<String, byte[]> messageStore;
    private int count = 0;
    Socket logger;
    OutputStream out;
    InputStream in = null;

    public MokLogger() {
        messageStore = new Hashtable<String, byte[]>();
    }

    public String store(byte[] message) {
        messageStore.put("" + count, message);
        count++;
        return "" + count;
    }

    public byte[] retrieve(String id) {
        return messageStore.get(id);
    }

    public void delete(String id) {
        messageStore.remove(id);
    }
}
